package pe.gob.onpe.facade;

import java.util.logging.Level;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import pe.gob.onpe.ejb.CierreVotacion;
import pe.gob.onpe.ejb.LogUtil;
import pe.gob.onpe.facade.local.CierreVotacionFacadeLocal;

@Stateless
public class CierreVotacionFacade implements CierreVotacionFacadeLocal {

	@PersistenceContext
	private EntityManager entityManager;
	
	public void save(CierreVotacion cierreVotacion) {
		LogUtil.log("saving CronogramaElectoral instance", Level.INFO, null);
		try {
			entityManager.persist(cierreVotacion);
			LogUtil.log("save successful", Level.INFO, null);
		} catch (RuntimeException re) {
			LogUtil.log("save failed", Level.SEVERE, re);
			throw re;
		}

	}

}
